Returns a substring whole length is guaranteed to be no longer than limit or the given string itself if its length is less than limit.